<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" href="{{__PUBLIC__}}/Home/css/address.css" />
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/common_header.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/common_bottom.css"/>
		<title></title>
	</head>
	<body>
		<!--引入公共头部-->
	{{include file="VIEW_PATH/Common/header.php"}}
	<!--logo下面的导航-->
	<?php 
//	实例化
	$cateModel = new \Home\Common\Model\Category;
//	调用模型里面的方法，得到数组
	$cateData = $cateModel->getCate();
	 ?>
	<div class="navigation_long">
		<div class="navigation">
			<div class="navigation_l">
				<p>全部商品<i></i></p>
				<!--二级菜单-->
				<ul class="category_box_l">
					{{foreach from="$cateData" value="$second_v"}}
			<li class="category_item">
				<div class="category-info">
					<a href="{{U('Lists/index',array('cid'=>$second_v['cid']))}}" class="category_title">{{$second_v['cname']}}</a>
					{{foreach from="$second_v['threeSon']" value="$threeSon_v"}}
					<a href="{{U('Lists/index',array('cid'=>$threeSon_v['cid']))}}" class="category_second">{{$threeSon_v['cname']}}</a>
					{{endforeach}}
				</div>
				<!--移入li右侧div-->
				<div class="category-panels">
					<ul class="subcate-list">
						{{foreach from="$second_v['son']" value="$son_v"}}
						<li class="subcate-item">
							<a href="/list-75" target="_blank">
								<span>{{$son_v['cname']}}</span>
							</a>
						</li>
						{{endforeach}}
					</ul>
				</div>
			</li>
			{{endforeach}}
		</ul>
		<!--二级菜单结束-->
			</div>
		<!--右侧-->
		<ul class="navigation_r">
			<li style="background: #BA181F;" class="navigation_r_hover">
				<a href="index.php">首页</a>
			</li>
			{{foreach from="$cateData" value="$nav_v"}}
			<li class="navigation_r_hover">
				<a href="{{U('Lists/index',array('cid'=>$nav_v['cid']))}}" >{{$nav_v['cname']}}</a>
			</li>
			{{endforeach}}
		</ul>	
		</div>
	</div>
	<!--logo下面的导航结束-->
		<!--顶部导航部分-->
		<div class="category">
			<a href="">首页</a>&nbsp;&nbsp;\&nbsp;&nbsp;<a href="">我的商城</a>&nbsp;&nbsp;\&nbsp;&nbsp;收货地址管理
		</div>
		<!--顶部导航部分结束-->
		<div class="main">
			<div class="left">
				<a class='title'>我的商城<a>
				<h3 class='order_center'>
					<span>订单中心</span>
				</h3>
				<ul class='order_list'>
					<li ><a href="{{U('index')}}">我的订单
					</a><em>{{$ordernum}}</em></li>
				</ul>

				<h3 class='order_center'>
					<span>个人中心</span>
				</h3>
				<ul class='order_list'>
					<li class='cur'><a href="">收货地址管理</a></li>

				</ul>
			</div>
			<!--右边部分-->
			<script type="text/javascript" src="{{__PUBLIC__}}/Home/js/jquery-1.8.2.min.js"></script>
			<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/hdjs/hdjs.css"/>
			<script type="text/javascript" src="{{__PUBLIC__}}/Home/hdjs/hdjs.min.js"></script>
			<!--<script type="text/javascript">
				$(function(){
					$('#Addaddress').click(function(){
						var data = $('#theform').serialize();
						alert(data);
					})
					
				})
			</script>-->
			<script type="text/javascript">
				$(function(){
					$('#theform').validate({
						uname:{
							rule:{
								required:true,
								china: true
							},
							error:{
								required:'收货人不能为空',
								china: '必须是中文',
							},
							success:'通过'
						},
						phone:{
							rule:{
								required:true,
								 maxlen: 11,
								 minlen: 11
							},
							error:{
								required:'电话号码不能为空',
								maxlen: '手机号码是数字或者超过11位啦',
								minlen: '手机号码是数字，不能小于11位'
							},
							success:'通过'
						},
						Deaddress:{
							rule:{
								required:true,
							},
							error:{
								required:'请填写详细的地址哦~~'
							},
							success:'通过'
						}
					})
				})
			</script>
			<div class="right">
				<h2 class='title'>收货地址管理</h2>
				<form action="" method="post" id="theform">
				<table class='form'>
					<tr class='shoujianren'>
						<th><span>*</span>收货人：</th>
						<td>
							<input type="text" name="uname" id="" />
						</td>
					</tr>
					<script type="text/javascript" src="{{__PUBLIC__}}/Home/js/area.js"></script>
					<script type="text/javascript">
						$(function(){
							//初始化方法
							area.init('a');
							//修改的时候默认被选中效果
							area.selected('黑龙江','哈尔滨','道里区');
						})
					</script>
					<tr class='shouhuodizi'>
						<th><span>*</span>收货地址：</th>
						<td>
							<select name="address[]" id="a1">
							</select>
							<select name="address[]" id="a2">
							</select>
							<select name="address[]" id="a3">
							</select>
						</td>
					</tr>
					<tr class='textar'>
						<th></th>
						<td>
							<textarea name="Deaddress" placeholder="详细地址"></textarea>
						</td>
					</tr>
					<tr class='youbian'>
						<th>邮编</th>
						<td>
							<input type="text" name="email" id="" />
						</td>
					</tr>
					<tr class='shoujianren'>
						<th><span>*</span>手机号码</th>
						<td>
							<input type="text" name="phone" id="" />
						</td>
					</tr>
					<tr class='default'>
						<th></th>
						<td>
							<label for="default_adderss">设为默认地址</label>
							<input type="checkbox" name="default" id="default_adderss"value="1" />
						</td>
					</tr>
					<tr class='sub'>
						<th></th>
						<td>
							<!--<a href="javascript:;" id="Addaddress">添加新地址</a>-->
							<!--用户的uid-->
							<input type="hidden" name="uid" value="{{$_SESSION['app_uid']}}"/>
							<input type="submit" value="添加新地址" />
							<!--<a href="">清空</a>-->
						</td>
					</tr>
				</table>
				</form>
				<!--*************-->
				<div style="display: block;" class="myAddress-record hide" id="myAddress-record">
					<div class="list-group-title">
						<table border="0" cellpadding="0" cellspacing="0">
							<thead>
								<tr>
									<th class="col-name">收货人</th>
									<th class="col-address">收货地址</th>
									<th class="col-zip">邮编</th>
									<th class="col-tel">手机/电话</th>
									<th class="col-operate">操作</th>
								</tr>
							</thead>
						</table>
					</div>
					<div class="list-group" id="list-group">
						{{foreach from="$addressData"  value="$address_v"}}
						<div class="list-group-item" id="myAddress-area-23246360">
							<table border="0" cellpadding="0" cellspacing="0">
								<tbody>
									<tr>
										<td class="col-name">{{$address_v['uname']}}</td>
										<td class="col-address">{{$address_v['address']}}</td>
										<td class="col-zip">{{$address_v['email']}}</td>
										<td class="col-tel">
											<p>{{$address_v['phone']}}</p>
										</td>
										<td class="col-operate">
											<p class="p-edit">
												<a class="edit" href="javascript:;"  >
													<span>编辑</span>
												</a>
											</p>
											<p class="p-del">
												<a class="del" href="{{U('User/del',array('adid'=>$address_v['adid']))}}" >
													<span>删除</span>
												</a>
											</p>
											{{if value="!$address_v['default'] eq 0"}}
											<p class="p-state">
												<span class="default" style="font-size: 14px;">默认地址</span>
											</p>
											{{else}}
											<p class="p-state">
												<a class="set " href="{{U('User/defaultAd',array('adid'=>$address_v['adid'],'uid'=>$_SESSION['app_uid']))}}"  title="设为默认收货地址">
												<span>设为默认</span>
												</a>
											</p>
											{{endif}}
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						{{endforeach}}
					</div>
				</div>
				<!--**************-->
			</div>
		</div>
		<!--**********-->
		<div style="visibility: hidden; width: 1348px; height: 1550px; z-index: 500;" class="ol_box_mask"></div>
		<div class="ol_box_4" id="ol_box" style="visibility: hidden; position: fixed; top: 74.5px; left: 459.5px; z-index: 500;"><div class="box-ct">	<div class="box-header">		<div class="box-tl"></div>		<div class="box-tc">			<div class="box-tc1"></div>			<div class="box-tc2"><a href="javascript:;" onclick="return false;" title="关闭" class="box-close"></a><span class="box-title"></span></div>		</div>		<div class="box-tr"></div>	</div>	<table style="table-layout:fixed;" border="0" cellpadding="0" cellspacing="0" width="100%">		<tbody><tr>			<td class="box-cl"></td>			<td class="box-cc">				<div style="height: auto;" class="box-content">	<!-- 20141219-我的地址-编辑成功-start -->
	<div class="box-prompt-success-area">
		<div class="h">
			<i></i>
		</div>
		<div class="b">
			<p>恭喜您，已成功添加新地址！</p>
		</div>
	</div>
</div>				<div class="box-button">						<a class="box-ok" href="javascript:;"><span>确定</span></a>				<a style="display: none;" class="box-cancel" href="javascript:;"><span>取消</span></a>				</div>			</td>			<td class="box-cr"></td>		</tr>	</tbody></table>	<div class="box-bottom">		<div class="box-bl"></div>		<div class="box-bc"></div>		<div class="box-br"></div>	</div></div></div>
<!--商城宣传-->
	<div class="slogan">
		<ul>
			<li style="width: 326px;"><i></i>500强企业 品质保证</li>
			<li style="width: 327px;"><i></i>7天退货 15天换货</li>
			<li><i></i>99元起免运费</li>
			<li style="float: right;"><i></i>448家维修网点 全国联保</li>
		</ul>
	</div>
<!--服务-->
	<!--底部友情链接-->
	<div class="footer">
		<div class="footer-warrant-area">
			<p>Copyright © 2011-2015  华为软件技术有限公司  版权所有  保留一切权利  苏B2-20130048号 | 苏ICP备09062682号-9</p>
			<p><a href="">网络文化经营许可证苏网文[2012]0401-019号</a></p>
			<p class="footer-warrant-img">
				<a href=""><img src="{{__PUBLIC__}}/Home/images/certificate_01_112_40.png" alt="" /></a>
				<a href=""><img src="{{__PUBLIC__}}/Home/images/certificate_02_112_40.png" alt="" /></a>
				<a href=""><img src="{{__PUBLIC__}}/Home/images/certificate_03_112_40.png" alt="" /></a>
			</p>
		</div>
	</div>
	</body>

</html>